package com.inspur.gs.sbssdl.sbwhgl.sbrh.sbrh.front.sbssluplandetail_frm.voactions;
import com.inspur.edp.bef.api.lcp.IStandardLcp;
import com.inspur.edp.bef.core.LcpUtil;
import com.inspur.edp.bff.api.dataprocessor.IDataConvertor;
import com.inspur.edp.bff.spi.action.save.AfterSaveAction;
import com.inspur.edp.bff.api.manager.context.SaveContext;
import com.inspur.edp.cef.entity.changeset.ModifyChangeDetail;
import com.inspur.edp.cef.entity.entity.IEntityData;
import com.inspur.edp.cef.entity.entity.IValuesContainer;

import java.util.List;

public class saveAfterVOAction extends AfterSaveAction {

	public saveAfterVOAction(SaveContext context) {
		super(context);
	}

	private String sbtzCfg = "com.inspur.gs.sbssdl.sbssgl.sbtz.sbtz.back.SbssSbtz";

	@Override
	public void execute() {
		String isCfg = getContext().getVariableData().getValue("isCfg").toString();
		String devId = getContext().getVariableData().getValue("devId").toString();
		IStandardLcp tzLcp = LcpUtil.getLcp(sbtzCfg);

		ModifyChangeDetail modify = new ModifyChangeDetail(devId);
		if ("true".equals(isCfg)){
			modify.putItem("rhp", true);
		}else {
			modify.putItem("rhp", false);
		}
		tzLcp.modify(modify);
		tzLcp.save();
	}
}
